package chixing.day20.proxy.homework.work3;

import java.time.LocalDate;

public class FlashSale extends Product{
    private int productId;
    private double discount;
    private LocalDate startTime;
    private LocalDate endTime;
    public FlashSale(){}
    public FlashSale(int productId, double discount, LocalDate startTime, LocalDate endTime) {
        this.productId = productId;
        this.discount = discount;
        this.startTime = startTime;
        this.endTime = endTime;
    }

    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    public double getDiscount() {
        return discount;
    }

    public void setDiscount(double discount) {
        this.discount = discount;
    }

    public LocalDate getStartTime() {
        return startTime;
    }

    public void setStartTime(LocalDate startTime) {
        this.startTime = startTime;
    }

    public LocalDate getEndTime() {
        return endTime;
    }

    public void setEndTime(LocalDate endTime) {
        this.endTime = endTime;
    }

    @Override
    public String toString() {
        return "FlashSale{" +
                "productId=" + productId +
                ", discount=" + discount +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                '}';
    }
}